/**
 * Copyright 2007 Luke Pillow
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.orsomethinglikethat.hinge.asgen.meta;

import org.apache.log4j.Logger;

/**
 * @author lpillow
 */
public class MetaField
{
    private static Logger log = Logger.getLogger( MetaField.class );

    private String fieldName;
    private String type;

    private boolean readable;
    private boolean writable;

    public MetaField( String fieldName, String typeName, boolean isReadable, boolean isWritable )
    {
        super();
        this.setFieldName( fieldName );
        this.setType( typeName );
        this.setReadable( isReadable );
        this.setWritable( isWritable );

        log.debug( "new MetaField( fieldName=>" + fieldName + " type=>" + typeName + " readable=>" + isReadable + " writable=>" + isWritable );
    }

    /**
     * @return the fieldName
     */
    public String getFieldName()
    {
        return fieldName;
    }

    /**
     * @param fieldName
     *            the fieldName to set
     */
    public void setFieldName( String name )
    {
        this.fieldName = name;
    }

    /**
     * @return the readable
     */
    public boolean isReadable()
    {
        return readable;
    }

    /**
     * @param readable
     *            the readable to set
     */
    public void setReadable( boolean readable )
    {
        this.readable = readable;
    }

    /**
     * @return the type
     */
    public String getType()
    {
        return type;
    }

    /**
     * @param type
     *            the type to set
     */
    public void setType( String typeName )
    {
        this.type = typeName;
    }

    /**
     * @return the writable
     */
    public boolean isWritable()
    {
        return writable;
    }

    /**
     * @param writable
     *            the writable to set
     */
    public void setWritable( boolean writable )
    {
        this.writable = writable;
    }

}
